<?php
/*----------------------------------------------------------------------
# Youjoomla Default Settings - April 2007
# ----------------------------------------------------------------------
# Copyright (C) 2007 You Joomla. All Rights Reserved.
# Designed by: You Joomla
# License: Commercial
# Website: http://www.youjoomla.com
------------------------------------------------------------------------*/
defined( '_JEXEC' ) or die( 'Restricted index access' );
//START COLLAPSING THAT MODULE:)
$left = $this->countModules( 'left' );
$right = $this->countModules( 'right' );
$advert2 = $this->countModules( 'advert2' );
if ( $left  &&  $right && $advert2) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$advert2_mods = '100%';
	$left_mods  = '50%';
	$right_mods = '50%';
    
	
	}elseif ( $left  &&  $right && $advert2) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$advert2_mods = '100%';
	$left_mods  = '50%';
	$right_mods = '50%';
    
	
	}elseif ( $left  &&  $right ) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$left_mods  = '50%';
	$right_mods = '50%';

	
	}elseif ( $left  &&  $advert2 ) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$left_mods  = '100%';
	$advert2_mods = '100%';
	
	}elseif ( $right  &&  $advert2 ) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$right_mods = '100%';
	$advert2_mods = '100%';


	
		
	}elseif ( $advert2) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$advert2_mods  = '100%';

	
	}elseif ( $left) {
    $main_body  = '79%';
	$faux ='20%';
	$mods_holder  = '20%';
	$left_mods  = '100%';

	
	
	}elseif ( $right) {
	$main_body  = '79%';
	$faux ='20%';
	$mods_holder  = '20%';
	$right_mods  = '100%';

	
		
	} else {
	$main_body  = '100%';
	$faux ='5px';

	}
//////////////////////////////////////

$lijevo = $this->countModules( 'left' );
$desno = $this->countModules( 'right' );
$advertdr = $this->countModules( 'advert2' );
$advert3 = $this->countModules( 'advert3' );
if ( $advert3) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$advert3_mods  = '100%';
	
    }elseif ( $advert3 &&  $advertdr) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$advert3_mods  = '100%';
	$advert2_mods  = '100%';
	
    }elseif ( $lijevo  &&  $advert3 ) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$left_mods  = '100%';
	$advert3_mods = '100%';


}elseif ( $lijevo  &&  $advertdr &&  $advert3 ) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$left_mods  = '100%';
	$advert3_mods = '100%';
	$advert2_mods  = '100%';
	
	}elseif ( $desno  &&  $advert3 ) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$right_mods = '100%';
	$advert3_mods = '100%';
	
	}elseif ( $desno  &&  $advert3 &&  $advertdr ) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$right_mods = '100%';
	$advert3_mods = '100%';
	$advert2_mods  = '100%';
	
	}elseif( $lijevo  &&  $desno && $advertdr && $advert3) {
    $main_body  = '59%';
	$faux ='40%';
	$mods_holder  = '40%';
	$advert2_mods = '100%';
	$advert3_mods = '100%';
	$left_mods  = '50%';
	$right_mods = '50%';
}

//START COLLAPSING TOP:)
$top = 0;
if ($this->countModules('user1')) $top++;
if ($this->countModules('user2')) $top++;
if ( $top == 2 ) {
	$topwidth = '50%';
} else if ($top == 1) {
	$topwidth = '100%';
}
//START COLLAPSING BOTTOM:)
$bottom = 0;
if ($this->countModules('user4')) $bottom++;
if ($this->countModules('user5')) $bottom++;
if ($this->countModules('user6')) $bottom++;
if ( $bottom == 3 ) {
	$bottomwidth = '33.3%';
}elseif ( $bottom == 2 ) {
	$bottomwidth = '50%';
} else if ($bottom == 1) {
	$bottomwidth = '100%';
}



$mbis = 0;
if ($this->countModules('user7')) $mbis++;
if ($this->countModules('user8')) $mbis++;
if ($this->countModules('user9')) $mbis++;
if ($this->countModules('user10')) $mbis++;
if ( $mbis == 4 ) {
	$mbmwidth = '25%';
}elseif ( $mbis == 3 ) {
	$mbmwidth = '33.3%';
}elseif ( $mbis == 2 ) {
	$mbmwidth = '50%';
} else if ($mbis == 1) {
	$mbmwidth = '100%';
}




// -- figure out what URL to use for prefix
// -- Loop through existing prefix to get all of the variables
$my_vars = $_GET;
$my_url = "";
if(!empty($my_vars)) {
// -- Loop through the vars that are passed and make sure they are not any of the reserved ones
foreach($my_vars as $col => $val) {
if($col != "change_font" && $col != "change_width" && $col != "change_css") {
$my_url .= htmlentities($col) ."=".htmlentities($val) . "&amp;";
}
}
$my_request = $_SERVER["PHP_SELF"]."?".strip_tags(substr($my_url, 0, -5),"&amp;")."&amp;"; // -- Add some more
}else{
$my_request = $_SERVER["PHP_SELF"]."?"; // -- All alone
}
function getCurrentURL(){
$cururl = JRequest::getURI();
if(($pos = strpos($cururl, "index.php"))!== false){
$cururl = substr($cururl,$pos);
}
$cururl = JRoute::_($cururl);
$cururl = ampReplace($cururl);
return $cururl;
}
//WHAT MENU ARE WE USING
if ( $menustyle == 3 || $menustyle == 4) {
	$menucss  = 'dropme.css';
	} else {
    $menucss = 'suck.css';
	}
	
if ( $menustyle == 3 || $menustyle == 4) {
	$menudiv  = 'navigacija_d';
	$menudiv_w  = 'suck_d';
	$mainpadd ="28px 0 0 0";
	} else {
    $menudiv = 'navigacija';
	$menudiv_w  = 'suck';
	$mainpadd ="5px 0";
	}

//  can we see some pics please
if ($useimages == 1){
if ( $menustyle == 3 || $menustyle == 4) {
require ("templates/".$this->template ."/droplineimg.php");
	} else {
require("templates/".$this->template ."/yjimg.php");

	}
}else{
if ( $menustyle == 3 || $menustyle == 4) {
require ("templates/".$this->template ."/dropline.php");
	} else {
require("templates/".$this->template ."/suckerfish.php");

	}
	}	
	
if ($compress == 1){
$jsextens ='php';
$cssextens ='php';
}else{
$jsextens ='js';
$cssextens ='css';
}
	// login//
$cpanel = $this->countModules( 'inset' );

if ( $cpanel ) {
	$loginstyle  = 'block';
} else {
	$loginstyle  = 'none';

}
// tools//
if ( $showcolor == 1 || $showwidth == 1 || $showfont == 1){ 
$tolsstyle='block';
}else{
$tolsstyle='none';
}

?>